package com.common.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.common.entity.BaseEntity;

/**
 * Service基础类
 * 
 * @author duanhx
 * @version [版本号, 2012-7-11]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
public class BaseService<T extends BaseEntity> {

	private static Logger logger = LoggerFactory.getLogger(BaseService.class);
	
	/**
	 * 把baseVo复制到baseEntity中
	 * 
	 * @param vo
	 * @param entity
	 * @throws IllegalAccessException
	 * @throws InvocationTargetException
	 * @throws NoSuchMethodException
	 */
//	protected T voToEntity(BaseVo vo, T entity) {
//		try {
//			PropertyUtils.copyProperties(entity, vo);
//		} catch (Exception e) {
//			logger.error("vo转换成entity发生错误, vo:" + vo.getClass().getName()
//					+ ", entity:" + entity.getClass().getName(), e);
//			
//			return null;
//		} 
//		
//		return entity;
//	}
}
